fix(workflow): atomically delete workflow definitions - #4234
Conversation
Implement relay-authored workflow DMs and atomically remove workflow definitions with their executable records. Co-authored-by: Michael Morale <michaelmorale1@gmail.com> Signed-off-by: Michael Morale <michaelmorale1@gmail.com>
Narrow the upstream pull request to the unique atomic workflow deletion repair; send_dm remains under discussion in PR block#2614 and issue block#2628. Co-authored-by: Michael Morale <michaelmorale1@gmail.com> Signed-off-by: Michael Morale <michaelmorale1@gmail.com>
|
The focused deletion change is ready for maintainer review. GitHub currently Local validation for the cumulative three-file diff passed:
The overlapping Could a maintainer approve the forked workflow runs and review this focused |
|
Reviewed this against the other open PRs for #2879/#717 and against What's right (verified)
Suggestions (non-blocking)
For context, I independently reached a nearly identical design (transactional two-store delete with a |
Summary
NIP-09 deletion of a workflow removed the executable
workflowsrow but leftthe live kind-30620 definition queryable. The workflow therefore still appeared
in
workflows list/get, and a retry could observe inconsistent executable andevent state.
This change:
PostgreSQL transaction
stale deletion arrives
author or the owning human of an agent-authored workflow
the correct trigger cache, including global workflows with no channel
Related issue
N/A. Searches for
workflow deletion definitionfound no related issue or PR.The separate
send_dmimplementation is deliberately excluded because it isalready proposed in #2614 and discussed in #2628.
Testing
cargo fmt --all -- --checkcargo clippy -p buzz-db -p buzz-relay --all-targets -- -D warningscargo test -p buzz-db --lib: 94 passed, 156 ignoredManual verification after deployment:
workflows list/get.a-tag deletion.definition and executable workflow remain.
The repository-wide
just cirun reached mobile tests after Rust lint/unit,desktop, Tauri, web, and mobile analyze passed. It then hit an unrelated,
reproducible failure in
mobile/test/features/channels/channel_detail_page_test.dart(keeps follow mode off while a tall newest message stays visible); this PR changes no mobilefiles. The relay library suite separately passed 835 tests with 38 ignored and
hit one unrelated, reproducible mesh-demo HTTP 504 in
api::mesh_demo::tests::demo_join_forwarded_arm_round_trips_echo.No deployment or live-relay change was performed.
Originating Buzz channel:
ace93da2-be69-44d7-84b6-061038ca55ee(Teal Tools Main Improvements).